xen/arm: vgic-v3: Correctly handle RAZ/WI registers
authorJulien Grall <julien.grall@linaro.org>
Mon, 16 Feb 2015 14:50:44 +0000 (14:50 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 19 Feb 2015 16:55:17 +0000 (16:55 +0000)
commit5e6958a7ee57982fc2f37e1f5c76d0d4e66d7e3b
tree62a90cc8a3d882c32b8c6be623d9a1c48ce199db
parent8d91d64e24b0248db44e394cdeabd6a6f68c8cb2
xen/arm: vgic-v3: Correctly handle RAZ/WI registers

Some of the registers are accessible via multiple size (see GICD_IPRIORITYR*).

Those registers are incorrectly implemented when they should be RAZ. Only
word-access size are currently allowed for them.

The paragraph 5.3.1 in the GICv3 spec (PRD03-GENC-010745 24.0) indicates
the different access-sizes supported for each register.

The current vGICv3 driver is not ready for 32 bits guest and will
require some rework. So, for now, only supporting access-size of a system not
supporting aarch32.

To avoid further issues, introduce different label following the access-size
of the registers:
    - read_as_zero_64 and write_ignore_64: Used for registers accessible
    via a double-word.
    - read_as_zero_32 and write_ignore_32: Used for registers accessible
    via a word.
    - read_as_zero: Used when we don't have to check the access size.

The latter is used when the access size has already been checked in the
register emulation and/or when the register offset is
reserved/implementation defined.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/vgic-v3.c